package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.GoodsPrice;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface GoodsPriceMapper {
    int deleteByPrimaryKey(String priceId);

    int insert(GoodsPrice record);

    int insertSelective(GoodsPrice record);

    GoodsPrice selectByPrimaryKey(String priceId);

    int updateByPrimaryKeySelective(GoodsPrice record);

    int updateByPrimaryKey(GoodsPrice record);

    //查出商品的各种级别对应的价格
    List<GoodsPrice> getListByGoodsId(String goodsId);

    //查询商品的价格
    Map<String,Object> getGoodsPriceByGoodsId(@Param("goodsId") String goodsId, @Param("customerId") String customerId);

    GoodsPrice getGoodsPriceByGoodsIdAndMemberLevelId(@Param("goodsId") String goodsId, 
                                                      @Param("memberLevelId") String memberLevelId);
}